package IO.Buffered;

import java.io.*;

/**
 * 文件字符的输入
 */
public class BufferedTest04 {
    public static void main(String[] args) {
        File dest = new File("src/IO/dest.txt");

        BufferedWriter writer = null;

        try {
            writer =new BufferedWriter(new FileWriter(dest)) ;
            //方法一
            String msg = "dsdjsdnm就付款时间反馈";
            char[] datas = msg.toCharArray();
            writer.write(datas,0,datas.length);

            //方法二
            writer.write("dsdjsdnm就付款时间反馈");
            //方法三
            writer.append("dsdjsdnm");
            writer.newLine();
            writer.append("就付款时间反馈");
            writer.flush();
            writer.close();
        } catch(FileNotFoundException e){
            e.printStackTrace();
        }catch (IOException e) {
            e.printStackTrace();
        }
    }
}
